<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>毕业论文管理系统</title>
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="./css/font.css">
<link rel="stylesheet" href="./css/xadmin.css">
<script type="text/javascript" src="./js/jquery-3.3.1.min.js"></script>
<script src="./lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/xadmin.js"></script>
</head>
<body>
	<form method="post" enctype="multipart/form-data">
		<button type="button" class="layui-btn" id="test1">
		  <i class="layui-icon">&#xe67c;</i>上传图片
		</button>
		<div class="layui-upload-drag" id="test10">
							  <i class="layui-icon"></i>
							  <p>点击上传，或将文件拖拽到此处</p>
		</div>
	</form>
	<script>
	layui.use('upload', function(){
	  var upload = layui.upload;
	  //执行实例
	  var uploadInst = upload.render({
	    elem: '#test1' //绑定元素
	    ,url: '${pageContext.request.contextPath }/uploadHeadImage.do' //上传接口
	    ,accept: 'file' 
	    ,done: function(res){
	      //上传完毕回调
	    	 if(res.code > 0){
	    	        return layer.msg('上传失败');
	    	      }
	    }
	    ,error: function(){
	      //请求异常回调
	    }
	  });
	});
	</script>
</body>
</html>